<?php 

require '../init.inc.php';

$api = new ArmoryAPI('Fyr', 'Die Aldor', 'Stab und Schwert');
$dat = $api->fetchGuild();

$chars = $dat->xpath('/page/guildInfo/guild/members/character');

foreach ($chars as $c):
        $characters[] = Util::readNode($c);
endforeach;

header('Content-Type: text/html; charset=utf-8');
echo '<ul>';
foreach ($characters as $item):
        printf('<li><img src="http://eu.wowarmory.com/images/icons/race/%s-%s.gif"> <img src="http://eu.wowarmory.com/images/icons/class/%s.gif"> %s',
                $item['raceId'],
                $item['genderId'],
                $item['classId'],
                $item['name']);
endforeach;
echo '</ul>';

echo '<hr/>';

Util::debug($characters);



?>